<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>用户列表</title>
    <link rel="icon" type="image/x-icon" th:href="@{/static/favicon.ico}" />
    <style>
        table {
            border-top: 1px solid lightgray;
            border-right: 1px solid lightgray;
        }
        th,td {
            border-bottom: 1px solid lightgray;
            border-left: 1px solid lightgray;
            text-align: center;
        }
    </style>
</head>
<body>
<center><h2>用户列表</h2></center>
<a th:href="@{/user/add}">添加用户</a>
<table width="90%" cellspacing="0" cellpadding="0" align="center">
    <thead>
    <tr>
        <th>编号</th>
        <th>姓名</th>
        <th>性别</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="user : ${users}">
        <td th:text="${user.id}">1</td>
        <td th:text="${user.username}">张</td>
        <td th:text="${user.sex}">男</td>
        <td>
            <a th:href="@{/user/edit/{id}(id=${user.id})}">修改</a> |
            删除
        </td>
    </tr>
    </tbody>
</table>
</body>
</html>